<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:t="http://myfaces.apache.org/tomahawk">

<body>

<ui:composition >
	<h:outputStylesheet>
        .top {
        vertical-align: top;
        }
 
        .info {
        width: 150px;
        height: 202px;
        overflow: auto;
        }
    </h:outputStylesheet>
	<div class="form">
		<h:panelGroup layout="block">
			<t:subform id="tab_eleve" >
				<h:messages id="messages" warnClass="msgWarn" errorClass="msgError" infoClass="msgInfo"
						globalOnly="true" />
								
				<h:panelGrid columns="2" >
					<h:panelGrid columns="1" >
						<h:panelGrid columns="2" columnClasses="tabline1, tabline2" styleClass="spanelTable">
							<h:panelGroup>
								<h:outputLabel value="Nom" for="nomTxt" id="nomLabel" styleClass="label" />
							</h:panelGroup>
							<h:panelGroup>
								<h:inputText value="#{GestionInscriptionControleur.modele.eleve.nom}" id="nomTxt" 
									required="true" />
								<h:message id="msgnomTxt" for="nomTxt"
								styleClass="msgContextuel" warnClass="msgWarn"
								errorClass="msgError" infoClass="msgInfo" />
							</h:panelGroup>
							<h:panelGroup>
								<h:outputLabel value="Nom arabe" for="nomArTxt" id="nomArLabel" styleClass="label" />
							</h:panelGroup>
							<h:panelGroup>
								<h:inputText value="#{GestionInscriptionControleur.modele.eleve.nom}" id="nomArTxt" 
									required="true" />
								<h:message id="msgnomArTxt" for="nomArTxt"
								styleClass="msgContextuel" warnClass="msgWarn"
								errorClass="msgError" infoClass="msgInfo" />
							</h:panelGroup>
							<h:panelGroup>
								<h:outputLabel value="Prénom" for="prenomTxt" id="prenomLabel" styleClass="label" />
							</h:panelGroup>
							<h:panelGroup>
								<h:inputText value="#{GestionInscriptionControleur.modele.eleve.prenom}" id="prenomTxt" 
									required="true" />
								<h:message id="msgprenomTxt" for="prenomTxt"
								styleClass="msgContextuel" warnClass="msgWarn"
								errorClass="msgError" infoClass="msgInfo" />	
							</h:panelGroup>
							<h:panelGroup>
								<h:outputLabel value="Prénom arabe" for="prenomArTxt" id="prenomArLabel" styleClass="label" />
							</h:panelGroup>
							<h:panelGroup>
								<h:inputText value="#{GestionInscriptionControleur.modele.eleve.prenomarabe}" id="prenomArTxt" 
									required="true" />
								<h:message id="msgprenomArTxt" for="prenomArTxt"
								styleClass="msgContextuel" warnClass="msgWarn"
								errorClass="msgError" infoClass="msgInfo" />	
							</h:panelGroup>
							<h:panelGroup>
								<rich:fileUpload  id="fileupload" fileUploadListener="#{GestionInscriptionControleur.listener}" acceptedTypes="jpg, gif, png, bmp" listHeight="1" addLabel="Choisir la photo"
									clearAllLabel="Effacer" clearLabel="Effacer" 
					                ontyperejected="alert('Seules les image de type JPG, GIF, PNG et BMP sont autorisées');" maxFilesQuantity="1" deleteLabel="Supprimer" uploadLabel="Valider"
					                doneLabel="chargement réussi" serverErrorLabel="Erreur de chargement" sizeExceededLabel="Taille max dépassée" >
                					<a4j:ajax event="uploadcomplete" execute="@none" render="info"  />
                			
            					</rich:fileUpload>
								<h:message id="msgfileupload" for="fileupload"
								styleClass="msgContextuel" warnClass="msgWarn"
								errorClass="msgError" infoClass="msgInfo" />	
							</h:panelGroup>
						</h:panelGrid>
						
					</h:panelGrid>
					<h:panelGrid columns="1" >
						<h:panelGroup id="info">
							<rich:panel bodyClass="info">
								<a4j:mediaOutput element="img" mimeType="image/jpeg" createContent="#{GestionInscriptionControleur.paint}"
                                    value="#{GestionInscriptionControleur.modele.eleve.id}"  cacheable="false">
                   				</a4j:mediaOutput>
							</rich:panel>
						</h:panelGroup>
					</h:panelGrid>
				</h:panelGrid>
				<h:panelGrid columns="2" columnClasses="tabline1, tabline2" styleClass="spanelTable">
					<h:panelGroup>
						<h:outputLabel value="Date de naissaince" for="dateNaissTxt" id="dateNaissLabel" styleClass="label"/>
					</h:panelGroup>
					<h:panelGroup>
						<rich:calendar id="dateNaissTxt" title="Date de naissance" 
										value="#{GestionInscriptionControleur.modele.eleve.datenaissance}"
										locale="FR" datePattern="dd/MM/yyyy" enableManualInput="true"
										showApplyButton="false"  inputSize="10" 
										required="true" />
						<h:message id="msgdateNaissTxt" for="dateNaissTxt"
								styleClass="msgContextuel" warnClass="msgWarn"
								errorClass="msgError" infoClass="msgInfo" />
					</h:panelGroup>	
					<h:panelGroup>	
						<h:outputLabel value="Lieu de naissaince" for="lieuNaissTxt" id="lieNaissLabel"  styleClass="label"/>
					</h:panelGroup>	
					<h:panelGroup>
						<h:inputText value="#{GestionInscriptionControleur.modele.eleve.lieunaissance}" id="lieuNaissTxt" 
							required="true" />
						<h:message id="msglieuNaissTxt" for="lieuNaissTxt"
								styleClass="msgContextuel" warnClass="msgWarn"
								errorClass="msgError" infoClass="msgInfo" />	
					</h:panelGroup>	
					<h:panelGroup>	
						<h:outputLabel value="Nationalité" for="nationaliteTxt" id="nationaliteLabel" styleClass="label"/>
					</h:panelGroup>
					<h:panelGroup>
						<h:inputText value="#{GestionInscriptionControleur.modele.eleve.nationalite}" id="nationaliteTxt" 
							required="true" />
						<h:message id="msgnationaliteTxt" for="nationaliteTxt"
								styleClass="msgContextuel" warnClass="msgWarn"
								errorClass="msgError" infoClass="msgInfo" />	
					</h:panelGroup>
					<h:panelGroup>	
						<h:outputLabel value="Adresse" for="adresseTxt" id="adresseLabel" styleClass="label" />
					</h:panelGroup>
					<h:panelGroup>
						<h:inputText id="adresseTxt" value="#{GestionInscriptionControleur.modele.eleve.adresse}"  
							required="true" />
						<h:message id="msgadresseTxt" for="adresseTxt"
								styleClass="msgContextuel" warnClass="msgWarn"
								errorClass="msgError" infoClass="msgInfo" />	
					</h:panelGroup>
					<h:panelGroup>	
						<h:outputLabel value="Adresse en arabe" for="adresseArTxt" id="adresseArLabel" styleClass="label" />
					</h:panelGroup>
					<h:panelGroup>
						<h:inputText id="adresseArTxt" value="#{GestionInscriptionControleur.modele.eleve.adressearabe}"  
							required="true"  />
						<h:message id="msgadresseArTxt" for="adresseArTxt"
								styleClass="msgContextuel" warnClass="msgWarn"
								errorClass="msgError" infoClass="msgInfo" />
					</h:panelGroup>
					
					<h:panelGroup>		
						<h:outputLabel value="Quartier" for="quartierTxt" id="quartierLabel" styleClass="label"/>
					</h:panelGroup>
					<h:panelGroup>
						<h:inputText value="#{GestionInscriptionControleur.modele.eleve.quartier}" id="quartierTxt" 
							required="true" />
						<h:message id="msgquartierTxt" for="quartierTxt"
								styleClass="msgContextuel" warnClass="msgWarn"
								errorClass="msgError" infoClass="msgInfo" />
					</h:panelGroup>	
			
					<h:panelGroup>		
						<h:outputLabel value="Ville" for="villeTxt" id="villeLabel" styleClass="label"/>
					</h:panelGroup>
					<h:panelGroup>		
						<h:inputText value="#{GestionInscriptionControleur.modele.eleve.ville}" id="villeTxt" 
						required="true"  />
						<h:message id="msgvilleTxt" for="villeTxt"
								styleClass="msgContextuel" warnClass="msgWarn"
								errorClass="msgError" infoClass="msgInfo" />
					</h:panelGroup>
			
				</h:panelGrid>
				
				<h:commandLink styleClass="btValider" value="Enregistrer" action="#{GestionInscriptionControleur.validerModificationEleve}"  />
				<h:commandLink styleClass="btPrecedent" value="Retour" action="ECR_RECHERCHE_ELEVE" immediate="true"/>
			</t:subform>
		</h:panelGroup>
	</div>
	
	
</ui:composition>
</body>
</html>